<!DOCTYPE html><html lang="zh-Hans"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><meta name="description" content="huluo的技术博客"><meta name="keywords" content=""><meta name="author" content="kyren"><meta name="copyright" content="kyren"><title>Stay hungry, stay foolish | Kyren's Blog</title><link rel="shortcut icon" href="/melody-favicon.ico"><link rel="stylesheet" href="/css/index.css?version=1.9.0"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@latest/css/font-awesome.min.css?version=1.9.0"><meta name="format-detection" content="telephone=no"><meta http-equiv="x-dns-prefetch-control" content="on"><link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="dns-prefetch" href="https://hm.baidu.com"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?cf87fcdbd9ab7cf93d894f7c219ae78f";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();</script><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><script src="https://v1.hitokoto.cn/?encode=js&amp;charset=utf-8&amp;select=.footer_custom_text" defer></script><script>var GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容:${query}"}},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  hexoVersion: '6.2.0'
} </script><meta name="generator" content="Hexo 6.2.0"></head><body><i class="fa fa-arrow-right" id="toggle-sidebar" aria-hidden="true"></i><div id="sidebar" data-display="false"><div class="author-info"><div class="author-info__avatar text-center"><img src="https://avatars.githubusercontent.com/u/5827823?v=4"></div><div class="author-info__name text-center">kyren</div><div class="author-info__description text-center">huluo的技术博客</div><div class="follow-button"><a target="_blank" rel="noopener" href="https://github.com/huluo666">Follow Me</a></div><hr><div class="author-info-articles"><a class="author-info-articles__archives article-meta" href="/archives"><span class="pull-left">文章</span><span class="pull-right">239</span></a><a class="author-info-articles__tags article-meta" href="/tags"><span class="pull-left">标签</span><span class="pull-right">41</span></a><a class="author-info-articles__categories article-meta" href="/categories"><span class="pull-left">分类</span><span class="pull-right">29</span></a></div><hr><div class="author-info-links"><div class="author-info-links__title text-center">Links</div><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:9090/">Jira</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://192.168.2.212:8090/">Confluence</a><a class="author-info-links__name text-center" target="_blank" rel="noopener" href="http://bloc.leniugame.com/">Leniu</a></div></div></div><nav class="no-bg" id="nav"><div id="page-header"><span class="pull-left"> <a id="site-name" href="/">Kyren's Blog</a></span><i class="fa fa-bars toggle-menu pull-right" aria-hidden="true"></i><span class="pull-right menus">   <a class="site-page" href="/">主页</a><a class="site-page" href="/essay">随笔</a><a class="site-page" href="/archives">归档</a><a class="site-page" href="/tags">标签</a><a class="site-page" href="/categories">分类</a><a class="site-page" href="/about">关于</a></span><span class="pull-right"><a class="site-page social-icon search"><i class="fa fa-search"></i><span> 搜索</span></a></span></div><div id="site-info"><div id="site-title">Kyren's Blog</div><div id="site-sub-title">Stay hungry, stay foolish</div><div id="site-social-icons"><a class="social-icon" href="https://github.com/huluo666" target="_blank" rel="noreferrer noopener nofollow"><i class="fa-github fa"></i></a></div></div></nav><div id="content-outer"><div class="layout" id="content-inner"><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/06/iOS%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E6%89%93%E9%80%A0JOSN%E6%A8%A1%E5%9E%8B%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E5%99%A8/">iOS百行代码打造JOSN模型代码生成器</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-06</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/iOS/">iOS</a></span><div class="content">Mac应用，采用xib方式，拖入2个NSTextView
代码比较简单，整个.m文件才百余行代码
ViewController.h
123456789#import &lt;Cocoa/Cocoa.h&gt;@interface ViewController : NSViewController@p ...</div><a class="more" href="/2017/04/06/iOS%E7%99%BE%E8%A1%8C%E4%BB%A3%E7%A0%81%E6%89%93%E9%80%A0JOSN%E6%A8%A1%E5%9E%8B%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E5%99%A8/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/05/%E4%BD%BF%E7%94%A8bootstrap%E5%B8%83%E5%B1%80/">使用bootstrap布局</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-05</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/JavaScript/">JavaScript</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/JavaScript/">JavaScript</a></span><div class="content">使用bootstrap布局
Bootstrap vs. Foundation vs. Skeleton
Bootstrap 和Foundation, Skeleton一样是响应式WEB界面框架。
bootstrap官网
http://www.bootcss.com/
http://v3.bootcs ...</div><a class="more" href="/2017/04/05/%E4%BD%BF%E7%94%A8bootstrap%E5%B8%83%E5%B1%80/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/01/macOS%E5%BF%AB%E6%8D%B7%E9%94%AE/">macOS快捷键</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-01</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/%E6%8A%80%E5%B7%A7/">技巧</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/%E6%8A%80%E5%B7%A7/">技巧</a></span><div class="content">macOS (OS X) 常用快捷键https://support.apple.com/zh-cn/HT201236
https://www.mediaatelier.com/CheatSheet/

</div><a class="more" href="/2017/04/01/macOS%E5%BF%AB%E6%8D%B7%E9%94%AE/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/04/01/%E5%88%A9%E7%94%A8gulp%E5%92%8Cbrowser-sync%E5%AE%9E%E7%8E%B0Pug(jade)%E7%9A%84%E5%AE%9E%E6%97%B6%E9%A2%84%E8%A7%88/">利用gulp和browser-sync实现Pug(jade)的实时预览</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-04-01</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/JavaScript/">JavaScript</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/node-js/">node.js</a></span><div class="content">jade由于和注册商标重名，更名为pug。
一、Pug安装编译$ npm install -g pug #全局安装
这里如果遇见了
bash: pug: command not found
还需要安装pug-cli，具体原因，Github给出的解释是这样的：
1You need to install ...</div><a class="more" href="/2017/04/01/%E5%88%A9%E7%94%A8gulp%E5%92%8Cbrowser-sync%E5%AE%9E%E7%8E%B0Pug(jade)%E7%9A%84%E5%AE%9E%E6%97%B6%E9%A2%84%E8%A7%88/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/03/31/%E8%BE%93%E5%85%A5%E6%B3%95%E5%B0%8F%E6%8A%80%E5%B7%A7/">输入法小技巧</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-03-31</time><span class="article-meta"><span class="article-meta__separator">|</span><i class="fa fa-inbox article-meta__icon" aria-hidden="true"></i><a class="article-meta__categories" href="/categories/%E6%8A%80%E5%B7%A7/">技巧</a></span><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/%E6%8A%80%E5%B7%A7/">技巧</a></span><div class="content">​    每次使用Markdown时，需要填写文章标题，日期，分类等信息，譬如grammar_cjkRuby这单词还真记不住，即使记住拼写也麻烦。
技巧：
使用搜狗输入法自定义短语（当然也可以用其他文本替换工具）
选择搜狗输入法偏好设置—高级—&gt;自定义短语—&gt;添加一下内容保存即可
缩写为 ...</div><a class="more" href="/2017/03/31/%E8%BE%93%E5%85%A5%E6%B3%95%E5%B0%8F%E6%8A%80%E5%B7%A7/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/03/31/myapp/">MyAPPPMacApp</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-03-31</time><div class="content">Mac七牛图床与文件批量上传工具


Mac批量Ping工具


</div><a class="more" href="/2017/03/31/myapp/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/03/30/iOS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/">iOS基础知识</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-03-30</time><div class="content">NSString为何要用copy，而不是strong？
NSString、NSArray、NSDictionary等等经常使用copy关键字，是因为他们有对应的可变类型：NSMutableString、NSMutableArray、NSMutableDictionary，为确保对象中的属性值不会无意 ...</div><a class="more" href="/2017/03/30/iOS%E5%9F%BA%E7%A1%80%E7%9F%A5%E8%AF%86/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/03/30/iOS%E5%BC%80%E5%8F%91%E8%BE%85%E5%8A%A9/">iOS开发辅助</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-03-30</time><div class="content">一、调色板增强扩展工具-skalacolorskalacolor是系统调色板工具colorPicker的增强扩展，与系统数码测色计相比，skalacolor除了能拷贝十进制，十六进制颜色值外，还可以直接拷贝objective c、Swift、css颜色代码。
下载安装
https://bjango. ...</div><a class="more" href="/2017/03/30/iOS%E5%BC%80%E5%8F%91%E8%BE%85%E5%8A%A9/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/03/28/Swift%E8%BD%AC%E6%8D%A2OBJECTIVE%20C/">OC与Swift代码转换工具</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-03-28</time><div class="content">http://www.ucai.cn/tools/oc2swifthttps://apps.myappconverter.com/cbcshttp://objc2swift.yahoo-labs.jp/https://objectivec2swift.com/#/converter/http://o ...</div><a class="more" href="/2017/03/28/Swift%E8%BD%AC%E6%8D%A2OBJECTIVE%20C/#more" style="margin-top: 14px">阅读更多</a><hr></div><div class="recent-post-item article-container"><a class="article-title" href="/2017/03/22/iOS%E8%87%AA%E5%AE%9A%E4%B9%89Log/">iOS开发自定义NSLog</a><time class="post-meta__date"><i class="fa fa-calendar" aria-hidden="true"></i> 2017-03-22</time><span class="article-meta tags"><span class="article-meta__separator">|</span><i class="fa fa-tag article-meta__icon" aria-hidden="true"></i><a class="article-meta__tags" href="/tags/iOS/">iOS</a></span><div class="content">屏蔽Xcode烦人LogXcode8之后，会打印一些烦人的Log信息
解决方法：1- Xcode菜单按钮: Product &gt; Scheme &gt; Edit Scheme&gt;Run&gt;Arguments或者直接按 command + shift + &lt; 快捷键
​		   2 ...</div><a class="more" href="/2017/03/22/iOS%E8%87%AA%E5%AE%9A%E4%B9%89Log/#more" style="margin-top: 14px">阅读更多</a><hr></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/page/11/"><i class="fa fa-chevron-left"></i></a><a class="page-number" href="/">1</a><span class="space">&hellip;</span><a class="page-number" href="/page/11/">11</a><span class="page-number current">12</span><a class="page-number" href="/page/13/">13</a><span class="space">&hellip;</span><a class="page-number" href="/page/24/">24</a><a class="extend next" rel="next" href="/page/13/"><i class="fa fa-chevron-right"></i></a></div></nav></div></div><footer><div class="layout" id="footer"><div class="copyright">&copy;2022 By kyren</div><div class="framework-info"><span>驱动 - </span><a target="_blank" rel="noopener" href="http://hexo.io"><span>Hexo</span></a><span class="footer-separator">|</span><span>主题 - </span><a target="_blank" rel="noopener" href="https://github.com/Molunerfinn/hexo-theme-melody"><span>Melody</span></a></div><div class="footer_custom_text">hitokoto</div><div class="busuanzi"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span id="busuanzi_container_site_uv"><i class="fa fa-user"></i><span id="busuanzi_value_site_uv"></span><span></span></span><span class="footer-separator">|</span><span id="busuanzi_container_site_pv"><i class="fa fa-eye"></i><span id="busuanzi_value_site_pv"></span><span></span></span></div></div></footer><i class="fa fa-arrow-up" id="go-up" aria-hidden="true"></i><script src="https://cdn.jsdelivr.net/npm/animejs@latest/lib/anime.min.js"></script><script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-animate@latest/velocity.min.js"></script><script src="https://cdn.jsdelivr.net/npm/velocity-ui-pack@latest/velocity.ui.min.js"></script><script src="/js/utils.js?version=1.9.0"></script><script src="/js/fancybox.js?version=1.9.0"></script><script src="/js/sidebar.js?version=1.9.0"></script><script src="/js/copy.js?version=1.9.0"></script><script src="/js/fireworks.js?version=1.9.0"></script><script src="/js/transition.js?version=1.9.0"></script><script src="/js/scroll.js?version=1.9.0"></script><script src="/js/head.js?version=1.9.0"></script><script src="/js/search/local-search.js"></script><script>if(/Android|webOS|iPhone|iPod|iPad|BlackBerry/i.test(navigator.userAgent)) {
  $('#nav').addClass('is-mobile')
  $('footer').addClass('is-mobile')
  $('#top-container').addClass('is-mobile')
}</script><div class="search-dialog" id="local-search"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章"></div></div></div><hr><div id="local-search-results"><div id="local-hits"></div><div id="local-stats"><div class="local-search-stats__hr" id="hr"><span>由</span> <a target="_blank" rel="noopener" href="https://github.com/wzpan/hexo-generator-search" style="color:#49B1F5;">hexo-generator-search</a>
 <span>提供支持</span></div></div></div><span class="search-close-button"><i class="fa fa-times"></i></span></div><div class="search-mask"></div></body></html>